<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ page import="org.apache.shiro.SecurityUtils" %>
<%@ page import="org.apache.shiro.subject.Subject" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Date" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
    boolean isAuthenticated = false;
    String currentUserName = "未登录";
    Subject currentUser = SecurityUtils.getSubject();
    if (currentUser.isAuthenticated()){
        isAuthenticated = true;
        currentUserName = currentUser.getPrincipal().toString();
    }
    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
    String dataNow = format.format(new Date(System.currentTimeMillis()));
%>
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
 	<div id="header">
		<div id="header-content">
			<div id="logo" ><a href="<%=basePath%>admin/index.jsp"
			style="font-size:28px;color:white;font-weight:bold;">APIS</a></div>
			<div id="user">
				<div id="user-head" class="fn-fr"><img width="40" height="40" src="<%=basePath%>admin/themes/images/head.jpg"/></div>
				<div id="user-info" class="fn-fl">
					<%=currentUserName%>
					<div class="fn-t12">
						<a href="<%=basePath%>security/user-edit.jsp?username=<%=currentUserName%>&prePage=../index.jsp">个人资料</a>
						<a href="<%=basePath%>security/logout">退出</a>
					</div>
				</div>
			</div>
			<div class="fn-clear"></div>
		</div>
 	</div>